package com.ht.system.api;

import com.ht.common.core.constant.SecurityConstants;
import com.ht.common.core.constant.ServiceNameConstants;
import com.ht.common.core.domain.R;
import com.ht.system.api.dto.DictDto;
import com.ht.system.api.factory.RemoteInitDictFallbackFactory;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * 卡口调用拦截高风险车辆检查服务组件
 *
 * @Description
 * @Version 1.0
 * @Author zmx
 * @Date 2024/11/8 0008 10:46
 */
@FeignClient(contextId = "remoteInitDictService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteInitDictFallbackFactory.class)
public interface RemoteInitDictService {
    /**
     * 初始化枚举到系统字典
     *
     * @param dictDto
     * @param source
     * @return Boolean
     */
    @PostMapping("/dict/type/remoteAddDict")
    public R<Boolean> initSysDict(@RequestBody DictDto dictDto, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
